<!--
 * @Author: your name
 * @Date: 2021-09-10 14:38:38
 * @LastEditTime: 2021-09-10 15:06:39
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\6-jQuery\day01\测试.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jquery.js"></script>
</head>

<body>
    <p>测试toggle</p>
    <button id="#btn1">隐藏</button>
    <button id="#btn2">显示</button>
    <button id="#btn3">切换</button>
</body>
<script>
    $(document).ready(function() {
        $("#btn1").click(
            function() {
                $("p").hide();
            }
        )
        $("#btn2").click(
            function() {
                $("p").show();
            }
        )
        $("#btn3").click(
            function() {
                $("p").toggle();
            }
        )
    });
</script>

</html>